<?php
namespace app\index\logic;
use think\Db;

class Customer
{
    /*
     * 客服信息获取
     * */
    public function getInfo()
    {
        $info = Db::table('quick_customer')->where('manage_id',request()->agentId)
                ->field('contact,working_time,qrcode')->findOrEmpty();
        if(empty($info))
        {
            $info = Db::table('quick_customer')->where('manage_id',0)
                ->field('contact,working_time,qrcode')->findOrEmpty();
        }

        if($info)
        {
            $info['qrcode'] = config('img_domain').$info['qrcode'];
        }

        return $info;
    }

}